package net.heri.xmppchat.persistence;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(daoClass = ParticipantDao.class, tableName = "xmpp_participant")
public class Participant {

	@DatabaseField(columnName = "id", generatedId = true)
	private Long participantId;
	@DatabaseField(columnName = "remote_user", canBeNull = false)
	private String remoteUser;
	@DatabaseField(columnName = "chat_session", canBeNull = false, foreign = true, foreignAutoRefresh = true)
	private ChatSession chatSession;
	
	public Participant() {
		
	}

	public Long getParticipantId() {
		return participantId;
	}

	public void setParticipantId(Long participantId) {
		this.participantId = participantId;
	}

	public String getRemoteUser() {
		return remoteUser;
	}

	public void setRemoteUser(String remoteUser) {
		this.remoteUser = remoteUser;
	}

	public ChatSession getChatSession() {
		return chatSession;
	}

	public void setChatSession(ChatSession chatSession) {
		this.chatSession = chatSession;
	}
	
}
